src1=testThread.cc
des1=testThread.exe
src2=threadControl.cc
des2=threadControl.exe
src3=cplusplusThread.cc
des3=cplusplusThread.exe
src4=threadTid.cc
des4=threadTid.exe
src5=localStorage.cc
des5=localStorage.exe 

.PHONY:all
all:$(des1) $(des2) $(des3) $(des4) $(des5)

$(des1):$(src1)
	@g++ $^ -o $@ -std=c++11
	@echo "compile $^ to $@!"
$(des2):$(src2)
	@g++ $^ -o $@ -std=c++11
	@echo "compile $^ to $@!"
$(des3):$(src3)
	@g++ $^ -o $@ -std=c++11
	@echo "compile $^ to $@!"
$(des4):$(src4)
	@g++ $^ -o $@ -std=c++11
	@echo "compile $^ to $@!"
$(des5):$(src5)
	@g++ $^ -o $@ -std=c++11
	@echo "compile $^ to $@!"

.PHONY:clean
clean:
	rm -rf $(des1), $(des2) $(des3) $(des4) $(des5)